/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Salem_NotePad;

import java.awt.Color;
import javax.swing.JColorChooser;
import javax.swing.JMenuItem;
import javax.swing.JToolBar;
import javax.swing.text.JTextComponent;

/**
 *
 * @author M S H
 */
public class For_Color {

    public void set_Fcolor(JTextComponent textComp ,JMenuItem  mBackGround){
            Color C = Color.BLACK;
            JColorChooser jcc = new JColorChooser();
            Color rr = JColorChooser.showDialog(mBackGround, "Change Color                      (NotePad--) ", C);
            textComp.setForeground(rr);
    }
    public void set_Bcolor(JTextComponent textComp ){
            Color C = Color.BLACK;
            JColorChooser jcc = new JColorChooser();
            Color rr = JColorChooser.showDialog( textComp,"Change Color                      (NotePad--) ", C);
            textComp.setBackground(rr);
    }
    
    public void set_Tcolor(JToolBar textComp ){
                    Color C = Color.BLACK;
            JColorChooser jcc = new JColorChooser();
            Color rr = JColorChooser.showDialog( textComp,"Change Color                      (NotePad--) ", C);
            textComp.setBackground(rr);
    }
}
